package cosplay.DAO;

import java.sql.Timestamp;
import java.util.List;

import cosplay.beans.PhotoInfos;
import cosplay.beans.Photos;

public interface PhotoDAO {
	public int add(PhotoInfos photo);
	public boolean delete(int id);
	public boolean edit(PhotoInfos photo,int id);
	public PhotoInfos get(int id);
	public List<PhotoInfos> getAll();
	public List<PhotoInfos> getByCompetition(int competitionid);
	public List<PhotoInfos> getByUpload(Timestamp start, Timestamp end);
	public List<PhotoInfos> getByUser(int userid);
	public List<PhotoInfos> getByTag(int tagid);
	public List<PhotoInfos> getLastUploaded();
	public List<PhotoInfos> getMostView();
	public List<PhotoInfos> getSuggested();
	public boolean join(int photoid);
	public boolean quit(int photoid);
	public boolean suggest(int photoid);
	public boolean unsuggest(int photoid);
	public int addRaw( Photos raw);
	public List<Integer> getRawByPhoto(int photoid);
	public byte[] getImage(int rawid);
	public byte[] getPreview(int rawid);
	public boolean moveRaw(int rawid, int newphotoid);
	public boolean setPreview(int rawid);
	public List<Integer> getAllId();
}
